﻿using System;
using System.Collections.Generic;
using SqlSugar;

namespace NCP.Model
{
    [Serializable]
    [SugarTable("Permission")]
    public partial class Permission : BaseModel
    {

        [SugarColumn(ColumnName = "PmsCode")]
        public string PmsCode { get; set; }

        [SugarColumn(ColumnName = "PmsName")]
        public string PmsName { get; set; }

        [SugarColumn(ColumnName = "PmsDesc")]
        public string PmsDesc { get; set; }

        [SugarColumn(ColumnName = "PmsType")]
        public string PmsType { get; set; }

        [SugarColumn(ColumnName = "ParentId")]
        public int ParentId { get; set; }

        [SugarColumn(ColumnName = "PmsAddr")]
        public string PmsAddr { get; set; }

        [SugarColumn(ColumnName = "Sort")]
        public int Sort { get; set; }

        [SugarColumn(ColumnName = "IconStr")]
        public string IconStr { get; set; }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public List<Permission> SubPermissionList { get; set; }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public int _parentId
        {
            get
            {
                return ParentId;
            }
        }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public int? RoleId { get; set; }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public bool Checked
        {
            get
            {
                return RoleId.HasValue;
            }
        }

    }
}
